{extend name="base" /}
{block name="header"}
<link rel="stylesheet" href="__STATIC__/admin/modules/editor/wangeditor.css">
{/block}
{block name="body"}
<div class="layui-fluid">
        <div class="layui-card">
        <!--tab标签-->
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                <li class=""><a href="{:url('admin/help/index')}">內容管理</a></li>
                <li class="layui-this">添加內容</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <form class="layui-form form-container" action="{:url('admin/help/save')}" method="post">
                        <div class="layui-form-item">
                            <label class="layui-form-label">所属分类</label>
                            <div class="layui-input-block">
                                <select name="cid" lay-verify="required">
                                    <option value=""></option>
                                    {foreach name="category_list" item="vo"}
                                    <option value="{$vo.id}">{$vo.name}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">标题</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" value="" required  lay-verify="required" placeholder="请输入标题" class="layui-input title">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">内容</label>
                            <div class="layui-input-block">
                                <div id="editor" style="height:500px;"></div>
                                <textarea class="editor-textarea" name="content" style="display: none"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">状态</label>
                            <div class="layui-input-block">
                                <input type="radio" name="status" value="1" title="已审核" checked="checked">
                                <input type="radio" name="status" value="0" title="未审核">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">首页</label>
                            <div class="layui-input-block">
                                <input type="radio" name="is_home" value="1" title="显示" >
                                <input type="radio" name="is_home" value="0" title="隐藏" checked>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">公告</label>
                            <div class="layui-input-block">
                                <input type="radio" name="affiche" value="1" title="是" >
                                <input type="radio" name="affiche" value="0" title="否" checked>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">排序</label>
                            <div class="layui-input-block">
                                <input type="text" name="sort" value="0" required  lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}